package com.mcf.xiaolinju.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mcf.xiaolinju.vo.villageReturn;
import com.mcf.xiaolinju.entity.Village;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.time.LocalDateTime;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mcf
 * @since 2021-10-14
 */
public interface VillageMapper extends BaseMapper<Village> {
    //通过用户的id查出小区的信息
    Village getByUserId(Integer id);
    //删除小区
    Integer del(int id, int updateid, LocalDateTime ldt);
   //修改小区信息
    Integer update(Integer province, Integer city, Integer area, String adress, String villagename,Integer updateid, Integer id, LocalDateTime ldt);
    //小区分页查询
    Page<villageReturn> selectpage(IPage<villageReturn> page);
    //小区的批量删除
    int delmany(int[] id, int updateid, LocalDateTime ldt);
    //小区的模糊查询
    Page<villageReturn> selectdim(IPage<villageReturn> page, Integer provinceid, Integer cityid, Integer townid, String villagename);
    //小程序查询小区的个数
    Integer getvillageid(String commityname, int provinceid, int cityid, int regionid);
}
